﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MasterPage.master" AutoEventWireup="true" 
CodeFile="Ad_Lottery_Get.aspx.cs" Inherits="Manage_Ad_Lottery_Get" MaintainScrollPositionOnPostback="true"
enableEventValidation ="false"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/css/glDatePicker.flatwhite.css") %>" />
<script type="text/javascript" src='<%=ResolveUrl("~/Scripts/glDatePicker.min.js")%>'></script>
 <style type="text/css">
        #lottery_get_table
        {
            width: 99%;
            border-collapse: collapse;
            empty-cells: show;
            margin-left: 8px;
            margin-top: 10px;
            margin-bottom: 20px;
        }
        #lottery_get_table tr
        {
            height: 35px;
            background: #f6f6f6;
        }
        #lottery_get_table tr td
        {
            border: #d8d8d8 1px solid;
            vertical-align: middle;
        }
        #lottery_get_table tr .td1
        {
            width: 110px;
            text-align: right;
            padding-right: 15px;
        }
        #lottery_get_table tr .td2
        {
            padding-left: 10px;
        }
        #frb tr
        {
            height: auto;
        }
        #frb tr td
        {
            border: 0px;
        }
        .tinput
        {
            width: 250px;
        }
        textarea
        {
            height: 170px;
            width: 450px;
        }
        .date_tb
        {
            width:250px;
        }
    </style>
    <script type="text/javascript">
        jQuery(document).ready(
            function () {
                $('.date_tb').glDatePicker({
                    //初始化日历空间
                    cssName: 'flatwhite',
                    showAlways: false,
                    format: 'yyyy-mm-dd'
                });
            }
        );
        var check_from_date = function () {
            if (jQuery("[id$=from_date_tb]").val().length == 0) {
                alert("请输入起始日期");
                return false;
            }
            return true;
        }
        var check_to_date = function () {
            if (jQuery("[id$=to_date_tb]").val().length == 0) {
                alert("请输入结束日期");
                return false;
            }
            return true;
        }
        var check_lottery_submit = function () {
            if (!check_from_date())
                return false;
            if (!check_to_date())
                return false;
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:HiddenField ID="idhf" runat="server" />
    <table id="lottery_get_table">
        <tr style="height: 25px; background: url('images/tt_x.gif') repeat-x;">
            <td colspan="2" style="padding-left: 8px;">
                抽取幸运用户
            </td>
        </tr>
        <tr>
            <td class="td1">
                活动名称:
            </td>
            <td class="td2">
                <asp:Label ID="LotteryName_lb" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="td1">
                活动简介:
            </td>
            <td class="td2">
                
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: left; padding-left: 20px; line-height:50px;">
                抽取模块:
                <asp:DropDownList ID="mokuai_ddl" runat="server">
                    <asp:ListItem>许愿墙
                    </asp:ListItem>
                    <asp:ListItem>留言板
                    </asp:ListItem>
                </asp:DropDownList>
                &nbsp;&nbsp;&nbsp;&nbsp;
                抽取数量
                <asp:DropDownList ID="size_ddl" runat="server">
                </asp:DropDownList>
                &nbsp;&nbsp;&nbsp;&nbsp;<br />
                抽取时段
                <asp:TextBox ID="from_date_tb" runat="server" CssClass="date_tb"></asp:TextBox>&nbsp;到
                <asp:TextBox ID="to_date_tb" runat="server" CssClass="date_tb"></asp:TextBox>
                &nbsp;&nbsp; &nbsp;&nbsp;
                <asp:Button ID="get_btn" runat="server" Text="抽取" onclick="get_btn_Click" OnClientClick="return check_lottery_submit();" />
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: right; padding-right: 20px;">
                <asp:GridView ID="lottery_gv" runat="server" Width="100%" CellPadding="3" EnableModelValidation="True"
                    ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" HeaderStyle-HorizontalAlign="Center"
                    DataKeyNames="id" RowStyle-HorizontalAlign="Center" OnRowCommand="lottery_gv_RowCommand">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="模块" ItemStyle-Width="50">
                            <ItemTemplate>
                                 <%#Eval("mokuai")%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="名称">
                            <ItemTemplate>
                                <%#Eval("uname")%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Email">
                            <ItemTemplate>
                                <%#Eval("Eamil")%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="兑奖码">
                            <ItemTemplate>
                                <%#Eval("checkCode")%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="抽奖时间">
                            <ItemTemplate>
                                
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:LinkButton ID="prizes_lb" runat="server" CommandName="prizes">兑奖</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: right; padding-right: 20px;">
                
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: right; padding-right: 20px;">
                <asp:Button ID="save_btn" runat="server" Text="保存抽奖结果" 
                    onclick="save_btn_Click"/>
            </td>
        </tr>
    </table>
</asp:Content>

